<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div,
      p {
        border: solid;
      }
    </style>
  </head>
  <body>
    <div id="box">content</div>
    <script>
      // dom树上的节点
      const box = document.getElementById("box");
      // <div> <p>
      const div = document.createElement("div");
      div.innerHTML = "tag div";
      const p = document.createElement("p");
      p.innerHTML = "tag p";

      box.after(div, p, "<b>hello jack</b>");
      // box.after(div, p, "hello jack");
      // box.before(div, p, "hello jack");
      // box.prepend(div, p, "hello jack");
      // box.append(div, p, "hello jack");
    </script>
  </body>
</html>
